#pragma once

#include <list>
#include "GamePlayer.h"

/*
	Delivers a signal that indicates if a game seat has been vacated or occupied.
*/
class AttendanceListener
{
public:
	/*
		Alerts the Listener to the number of records it will have to anticipate.
		This signal should be sent prior to participantIntroduced,
		so that Listener won't have to allocate, then reallocate memory
		to manage its own participant records.
		@param count	quantity of participants in this activity
						(maximum amount of seats that can be occupied)
	*/
	virtual
	void participantCountSet(SeatNumber) = 0;

	/*
		@param seatNum	the index of the seat that was vacated
		@param who		pointer to the participant that either just arrived,
						or one who should be identified to another participant
							(perhaps it is the Listener that just arrived)
	*/
	virtual
	void participantIntroduced(SeatNumber, GamePlayer* who) = 0;

	/*
		@param seatNum	the index of the seat that was vacated
		@param who		pointer to the participant that just departed
	*/
	virtual
	void participantLeft(SeatNumber, GamePlayer* who) = 0;
}; // end class

// Abstraction of an AttendanceListener collection.
typedef std::list<AttendanceListener*> AttendanceList;
